<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"
	import="java.util.*"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%  PropertyResourceBundle prb = (PropertyResourceBundle) PropertyResourceBundle.getBundle("prop");
	String downloadPhotoPath = prb.getString("downloadPhotoPath");
%>

<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <%@include file="style.jsp" %>
    <%@include file="script.jsp" %>
    <link rel="stylesheet" href="${pageContext.request.contextPath}/static/orderlang/distributor/css/activity_detail.css"/>
    <title>活动详情</title>
</head>
<body>
<div id="container_1" style="height:100%">
    <div style="position: relative">
        <%@include file="header.jsp" %>
    </div>
    <div id="content" class="clearfix">
        <%@include file="left_menu.jsp" %>
        <!--内容部分-->
        <div class="right-content" style="margin:75px 20px 0 213px;">
            <p class="brand">
                <a>商品</a>><a href="${pageContext.request.contextPath}/productActivity/listActivity">商品促销</a>><a class="now">活动详情</a>
            </p>
            <div class="content" >
                <div class="top-block">
                    <img src="<%=downloadPhotoPath %>/${productActivity.photoHref}" alt=""/>
                    <div>
                        <h3>${productActivity.title }</h3>
                        <h4>活动时间：<fmt:formatDate value="${productActivity.startTime}"  pattern="MM.dd"/>
                            至
                            <fmt:formatDate value="${productActivity.endTime}"  pattern="MM.dd"/>
                        </h4>
                    </div>
                </div>
                <div class="product-list">
                    <table>
                        <thead>
                            <tr>
                                <td><s></s></td>
                                <td>商品图片</td>
                                <td>商品名称</td>
                                <td>规格</td>
                                <td>标准</td>
                                <td>市场价</td>
                                <td>订货价</td>
                                <td>实际库存</td>
                                <td>促销特价</td>
                           	 	<td>商品总量限制</td>
                            	<td>每人限量</td>
                                <td></td>
                            </tr>
                        </thead>
                        <tbody>
                        	<c:forEach items="${productActivityProductList }" var="productActivityProduct">
		                        <tr id="${productActivityProduct.productActivityProductId }">
		                            <td><s></s></td>
		                            <td>
		                                <div>
		                                    <img src="${pageContext.request.contextPath}/img/1.jpg"/>
		                                </div>
		                            </td>
		                            <td>
		                                <p>${productActivityProduct.code }</p>
		                                <p>${productActivityProduct.productName }</p>
		                                <p>${productActivityProduct.brandName }</p>
		                            </td>
		                            <td>${productActivityProduct.specNameValue}</td>
		                            <td>${productActivityProduct.standard }</td>
		                            <td>${productActivityProduct.price }/${productActivityProduct.littleUnit}</td>
		                            <td>${productActivityProduct.orderedPrice }/${productActivityProduct.littleUnit}</td>
		                            <td>${productActivityProduct.actualInvertory}${productActivityProduct.littleUnit}</td>
		                            <td>${productActivityProduct.activityPrice }</td>
		                            <td>${productActivityProduct.totalLimit }</td>
		                            <td>${productActivityProduct.personLimit }</td>
		                            <td>
		                                <button class="detail" onclick="productDetail(${productActivityProduct.id})">详情</button>
		                                <!-- <button class="revise">修改</button>
		                                <button class="delete">删除</button> -->
		                            </td>
		                        </tr>
                        	</c:forEach>
                        <!-- <tr>
                            <td><s></s></td>
                            <td>
                                <div>
                                    <p>双旦促销！错过在等一年</p>
                                    <p class="product-state starting">进行中</p>
                                </div>

                            </td>
                            <td>11.17-12.12</td>
                            <td>二级代理商</td>
                            <td>陕西西安</td>
                            <td>12.18-12.31</td>
                            <td>
                                <button class="detail">详情</button>
                                <button class="revise">修改</button>
                                <button class="delete">删除</button>
                            </td>
                        </tr> -->
                        <!-- <tr>
                            <td><s></s></td>
                            <td>
                                <div>
                                    <p>双旦促销！错过在等一年</p>
                                    <p class="product-state over">已结束</p>
                                </div>

                            </td>
                            <td>11.17-12.12</td>
                            <td>全部</td>
                            <td>全部</td>
                            <td>12.18-12.31</td>
                            <td>
                                <button class="detail">详情</button>
                                <button class="revise">修改</button>
                                <button class="delete">删除</button>
                            </td>
                        </tr> -->
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
        <script src="${pageContext.request.contextPath}/static/orderlang/distributor/js/activity_detail.js"></script>
        <!--内容部分结束-->
    </div>
</div>

</body>
</html>